package com.gitee.zzh.demo.service.impl;

import java.util.Random;

public class ImgCheckCodeParams {
    Integer GRAY = 30;
    Integer WIDTH = 80;
    Integer HEIGHT = 45;
    Integer DOTS_SUM = 50;
    Integer DOTS_LEN = 2;
    Integer CODE_COUNT = 4;
    Integer FONT_SIZE = 24;
    String CHECK_CODE_STR = "ACDEFGHJKLMNPQRSTUVWXYZacdefghijkmnpqrstuvwxyz1234579";
    String CHECK_CODE_FACE = "Times New Roman";
    Integer WAVE_LEFT_RIGHT = 6;
    Integer WAVE_BOTTOM_TOP = 5;
    Integer MARGIN_LEFT = 2;
    Integer PADDING_RIGHT = 20;
    Integer BOTTOM_TO_TOP = 25;

    int getRandomNum(int n){
        float rand = new Random().nextInt(n);
        float fnum = -0.5f + rand/n;
        return Math.round(fnum * n);
    }

}
